
#ifndef	COMMON_MUTEX_H
#define	COMMON_MUTEX_H


#include "common.h"


namespace	common
{
	class	mutex
	{
	public:

		mutex();
		~mutex();

		bool	create( size_t spin_count = 0 );
		void	destroy();

		bool	lock();
		bool	try_lock();
		bool	unlock();

	private:

		CRITICAL_SECTION*	cs_;

	};
}




#endif